
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>Grid System · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="Handwritten signature.html" />
    
    
    <link rel="prev" href="./" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    Introduction
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="./">
            
                <a href="./">
            
                    
                    前端进阶
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.3" data-path="Grid System.html">
            
                <a href="Grid System.html">
            
                    
                    Grid System
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="Handwritten signature.html">
            
                <a href="Handwritten signature.html">
            
                    
                    Handwritten Signature
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="Mobile Soft Keyboard.html">
            
                <a href="Mobile Soft Keyboard.html">
            
                    
                    Mobile Soft Keyboard
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="authentication.html">
            
                <a href="authentication.html">
            
                    
                    Authentication
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7" >
            
                <span>
            
                    
                    Code
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" >
            
                <span>
            
                    
                    Four Operations
            
                </span>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="control loading.html">
            
                <a href="control loading.html">
            
                    
                    Control Loading
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9" data-path="downfile.html">
            
                <a href="downfile.html">
            
                    
                    Downfile
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10" data-path="dynamic-routing.html">
            
                <a href="dynamic-routing.html">
            
                    
                    Dynamic Routing
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11" data-path="ecs.html">
            
                <a href="ecs.html">
            
                    
                    Ecs
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12" data-path="engineering.html">
            
                <a href="engineering.html">
            
                    
                    Engineering
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.13" data-path="eslint-vscode-format.html">
            
                <a href="eslint-vscode-format.html">
            
                    
                    Eslint Vscode Format
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.14" data-path="eventloop.html">
            
                <a href="eventloop.html">
            
                    
                    Eventloop
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.15" data-path="four-operations-1.html">
            
                <a href="four-operations-1.html">
            
                    
                    Four Operations 1
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.16" data-path="four-operations-2.html">
            
                <a href="four-operations-2.html">
            
                    
                    Four Operations 2
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.17" data-path="four-operations-3.html">
            
                <a href="four-operations-3.html">
            
                    
                    Four Operations 3
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.18" data-path="four-operations-4.html">
            
                <a href="four-operations-4.html">
            
                    
                    Four Operations 4
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.19" data-path="front end summary.html">
            
                <a href="front end summary.html">
            
                    
                    Front End Summary
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.20" data-path="git commit style.html">
            
                <a href="git commit style.html">
            
                    
                    Git Commit Style
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.21" data-path="git-commands.html">
            
                <a href="git-commands.html">
            
                    
                    Git Commands
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.22" data-path="high-quality-code.html">
            
                <a href="high-quality-code.html">
            
                    
                    High Quality Code
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.23" data-path="history.html">
            
                <a href="history.html">
            
                    
                    History
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.24" data-path="html-tag.html">
            
                <a href="html-tag.html">
            
                    
                    Html Tag
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.25" data-path="http-https-http2.html">
            
                <a href="http-https-http2.html">
            
                    
                    Http Https Http2
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.26" data-path="ignore log.html">
            
                <a href="ignore log.html">
            
                    
                    Ignore Log
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.27" >
            
                <span>
            
                    
                    Imgs
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="1.28" data-path="javascript-optimization.html">
            
                <a href="javascript-optimization.html">
            
                    
                    Javascript Optimization
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.29" data-path="local application.html">
            
                <a href="local application.html">
            
                    
                    Local Application
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.30" data-path="locality.html">
            
                <a href="locality.html">
            
                    
                    Locality
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.31" data-path="loop-unrolling.html">
            
                <a href="loop-unrolling.html">
            
                    
                    Loop Unrolling
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.32" data-path="mobile recommendation.html">
            
                <a href="mobile recommendation.html">
            
                    
                    Mobile Recommendation
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.33" data-path="modal.html">
            
                <a href="modal.html">
            
                    
                    Modal
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.34" data-path="monitor.html">
            
                <a href="monitor.html">
            
                    
                    Monitor
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.35" data-path="performance.html">
            
                <a href="performance.html">
            
                    
                    Performance
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.36" data-path="print-talbe.html">
            
                <a href="print-talbe.html">
            
                    
                    Print Talbe
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.37" data-path="promise.html">
            
                <a href="promise.html">
            
                    
                    Promise
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.38" data-path="teaching.html">
            
                <a href="teaching.html">
            
                    
                    Teaching
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.39" data-path="vue refresh.html">
            
                <a href="vue refresh.html">
            
                    
                    Vue Refresh
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.40" data-path="vue-page-not-refresh.html">
            
                <a href="vue-page-not-refresh.html">
            
                    
                    Vue Page Not Refresh
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.41" data-path="why-learn-theory.html">
            
                <a href="why-learn-theory.html">
            
                    
                    Why Learn Theory
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >Grid System</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="&#x6805;&#x683C;&#x5316;&#x7CFB;&#x7EDF;&#x7684;&#x539F;&#x7406;&#x4EE5;&#x53CA;&#x5B9E;&#x73B0;">&#x6805;&#x683C;&#x5316;&#x7CFB;&#x7EDF;&#x7684;&#x539F;&#x7406;&#x4EE5;&#x53CA;&#x5B9E;&#x73B0;</h1>
<h2 id="&#x4EC0;&#x4E48;&#x662F;&#x6805;&#x683C;&#x5316;">&#x4EC0;&#x4E48;&#x662F;&#x6805;&#x683C;&#x5316;</h2>
<p>&#x5728;&#x4E00;&#x4E2A;&#x6709;&#x9650;&#x7684;&#x3001;&#x56FA;&#x5B9A;&#x7684;&#x5E73;&#x9762;&#x4E0A;&#xFF0C;&#x7528;&#x6C34;&#x5E73;&#x7EBF;&#x548C;&#x5782;&#x76F4;&#x7EBF;&#xFF08;&#x865A;&#x62DF;&#x7684;&#x7EBF;&#xFF0C;&#x201C;&#x53C2;&#x8003;&#x7EBF;&#x201D;&#xFF09;&#xFF0C;&#x5C06;&#x5E73;&#x9762;&#x5212;&#x5206;&#x6210;&#x6709;&#x89C4;&#x5F8B;&#x7684;&#x4E00;&#x7CFB;&#x5217;&#x201C;&#x683C;&#x5B50;&#x201D;&#xFF08;&#x865A;&#x62DF;&#x7684;&#x683C;&#x5B50;&#xFF09;&#xFF0C;&#x5E76;&#x4F9D;&#x6258;&#x8FD9;&#x4E9B;&#x683C;&#x5B50;&#x3001;&#x6216;&#x4EE5;&#x683C;&#x5B50;&#x7684;&#x8FB9;&#x7EBF;&#x4E3A;&#x57FA;&#x51C6;&#x7EBF;&#xFF0C;&#x6765;&#x8FDB;&#x884C;&#x6709;&#x89C4;&#x5F8B;&#x7684;&#x7248;&#x9762;&#x5E03;&#x5C40;&#x3002;</p>
<p>&#x901A;&#x4FD7;&#x70B9;&#x6765;&#x8BF4;&#xFF0C;&#x5C31;&#x662F;&#x4EBA;&#x4E3A;&#x7684;&#x628A;&#x7F51;&#x9875;&#x4E2D;&#x7684;&#x4E00;&#x884C;&#xFF0C;&#x7B49;&#x6BD4;&#x4F8B;&#x5212;&#x5206;,&#x6BD4;&#x5982;&#x5C06;&#x4E00;&#x884C;&#x5212;&#x5206;&#x4E3A; 12 &#x7B49;&#x5206;&#x3002;&#x7136;&#x540E;&#x5728;&#x6BCF;&#x4E2A;&#x683C;&#x5B50;&#x91CC;&#x8FDB;&#x884C;&#x9875;&#x9762;&#x5F00;&#x53D1;&#xFF0C;&#x8FD9;&#x5C31;&#x6805;&#x683C;&#x5316;&#x3002;
<img src="https://github.com/woai3c/Front-end-articles/blob/master/imgs/grid1.jpg" alt="grid1"></p>
<h2 id="&#x539F;&#x7406;">&#x539F;&#x7406;</h2>
<p>&#x5047;&#x5982;&#x5728;&#x9875;&#x9762;&#x91CC;&#x5B9A;&#x4E49;&#x4E86;&#x4E00;&#x4E2A; DIV&#xFF0C;&#x5E76;&#x8BBE;&#x7F6E;&#x5982;&#x4E0B; CSS &#x5C5E;&#x6027;&#xFF1A;</p>
<pre><code class="lang-css"><span class="hljs-selector-tag">div</span> {
  <span class="hljs-attribute">border</span>: <span class="hljs-number">1px</span> solid <span class="hljs-number">#ddd</span>;
  <span class="hljs-attribute">height</span>: <span class="hljs-number">200px</span>;
  <span class="hljs-attribute">width</span>: <span class="hljs-number">100%</span>;
}
</code></pre>
<p><img src="https://github.com/woai3c/Front-end-articles/blob/master/imgs/grid2.jpg" alt="grid2">
&#x9875;&#x9762;&#x4E0A;&#x5C06;&#x4F1A;&#x5C55;&#x793A;&#x4E00;&#x4E2A;&#x5E26;&#x6709;&#x7070;&#x8272;&#x8FB9;&#x6846;&#x7684;&#xFF0C;&#x5BBD;&#x5EA6; 100% &#x7684;&#x77E9;&#x5F62;&#x3002;&#x5982;&#x679C;&#x624B;&#x52A8;&#x63A7;&#x5236;&#x6D4F;&#x89C8;&#x5668;&#x653E;&#x5927;&#x7F29;&#x5C0F;&#xFF0C;&#x6B64; DIV &#x4E5F;&#x4F1A;&#x76F8;&#x5E94;&#x7684;&#x653E;&#x5927;&#x7F29;&#x5C0F;&#xFF0C;&#x4F46;&#x5BBD;&#x5EA6;&#x59CB;&#x7EC8;&#x662F; 100%&#x3002;
<br></p>
<p>&#x5982;&#x679C;&#x5728;&#x9875;&#x9762;&#x5B9A;&#x4E49;&#x4E86;&#x4E24;&#x4E2A; DIV&#xFF0C;&#x5E76;&#x8BBE;&#x7F6E;&#x5982;&#x4E0B; CSS &#x5C5E;&#x6027;&#xFF1A;</p>
<pre><code class="lang-css">body {
    font-size: 0; // &#x5C06;inline-block&#x5E03;&#x5C40;&#x4E24;&#x4E2A;DIV&#x4E4B;&#x95F4;&#x7684;&#x8DDD;&#x79BB;&#x6E05;&#x9664;
}
div {
    height: 200px;
    border: 1px solid #ddd;
    width: 50%;
    display: inline-block;
    box-sizing: border-box;
    vertical-align: top; // &#x9876;&#x90E8;&#x5BF9;&#x9F50;
}
</code></pre>
<p><img src="https://github.com/woai3c/Front-end-articles/blob/master/imgs/grid3.jpg" alt="grid3">
&#x9875;&#x9762;&#x4E0A;&#x5C06;&#x4F1A;&#x6709;&#x4E24;&#x4E2A;&#x5BBD;&#x5EA6;&#x5404;&#x5360; 50% &#x7684; DIV&#xFF0C;&#x5982;&#x679C;&#x9875;&#x9762;&#x653E;&#x5927;&#x6216;&#x7F29;&#x5C0F;&#xFF0C;&#x8FD9;&#x4E24;&#x4E2A; DIV &#x90FD;&#x4F1A;&#x59CB;&#x7EC8;&#x4FDD;&#x6301;&#x7740;&#x9875;&#x9762; 50% &#x7684;&#x5BBD;&#x5EA6;&#x3002;</p>
<p>&#x76F8;&#x4FE1;&#x5230;&#x8FD9;&#x91CC;&#xFF0C;&#x5E94;&#x8BE5;&#x6709;&#x4EBA;&#x770B;&#x51FA;&#x6765;&#x4E86;&#xFF0C;&#x8FD9;&#x5C31;&#x662F;&#x6805;&#x683C;&#x5316;&#xFF0C;&#x53EA;&#x4E0D;&#x8FC7;&#x7B2C;&#x4E00;&#x4E2A;&#x4F8B;&#x5B50;&#x662F;&#x5C06;&#x4E00;&#x884C;&#x5212;&#x5206;&#x4E3A; 1 &#x7B49;&#x5206;&#xFF0C;&#x5373;&#x53EA;&#x6709;&#x4E00;&#x4E2A;&#x683C;&#x5B50;&#x3002;
&#x7B2C;&#x4E8C;&#x4E2A;&#x4F8B;&#x5B50;&#x5C06;&#x4E00;&#x884C;&#x5212;&#x5206;&#x4E3A; 2 &#x7B49;&#x5206;&#xFF0C;&#x5373;&#x6709;&#x4E24;&#x4E2A;&#x683C;&#x5B50;&#x3002;&#x5982;&#x679C;&#x6211;&#x5C06;&#x4E00;&#x884C;&#x5212;&#x5206;&#x4E3A; 12 &#x7B49;&#x5206;&#xFF0C;&#x90A3;&#x5C31;&#x8DDF; bootstrap &#x4E2D;&#x7684;&#x6805;&#x683C;&#x5316;&#x7CFB;&#x7EDF;&#x4E00;&#x6A21;&#x4E00;&#x6837;&#x4E86;&#xFF0C;&#x6709; 12 &#x4E2A;&#x683C;&#x5B50;&#x3002;</p>
<h2 id="&#x5B9E;&#x73B0;">&#x5B9E;&#x73B0;</h2>
<p>&#x8BA9;&#x6211;&#x4EEC;&#x6765;&#x4EB2;&#x81EA;&#x5B9E;&#x73B0;&#x4E00;&#x4E2A;&#x6805;&#x683C;&#x5316;&#x7CFB;&#x7EDF;&#xFF0C;&#x5047;&#x8BBE;&#x6211;&#x4EEC;&#x8981;&#x5C06;&#x4E00;&#x884C;&#x5212;&#x5206;&#x4E3A; 12 &#x7B49;&#x5206;&#xFF0C;&#x90A3; 1 &#x7B49;&#x5206;&#x5C31;&#x5360;&#x6709; <code>100% / 12 = 8.33%</code> &#x7684;&#x5BBD;&#x5EA6;&#x3002;</p>
<p>&#x76F8;&#x5E94;&#x7684; CSS &#x53EF;&#x4EE5;&#x8FD9;&#x6837;&#x8BBE;&#x7F6E;&#xFF1A;</p>
<pre><code class="lang-css"><span class="hljs-selector-class">.col1</span>  {<span class="hljs-attribute">width</span>: <span class="hljs-number">8.33%</span>}
<span class="hljs-selector-class">.col2</span>  {<span class="hljs-attribute">width</span>: <span class="hljs-number">16.66%</span>}
<span class="hljs-selector-class">.col3</span>  {<span class="hljs-attribute">width</span>: <span class="hljs-number">25%</span>}
<span class="hljs-selector-class">.col4</span>  {<span class="hljs-attribute">width</span>: <span class="hljs-number">33.33%</span>}
<span class="hljs-selector-class">.col5</span>  {<span class="hljs-attribute">width</span>: <span class="hljs-number">41.66%</span>}
<span class="hljs-selector-class">.col6</span>  {<span class="hljs-attribute">width</span>: <span class="hljs-number">50%</span>}
<span class="hljs-selector-class">.col7</span>  {<span class="hljs-attribute">width</span>: <span class="hljs-number">58.33%</span>}
<span class="hljs-selector-class">.col8</span>  {<span class="hljs-attribute">width</span>: <span class="hljs-number">66.66%</span>}
<span class="hljs-selector-class">.col9</span>  {<span class="hljs-attribute">width</span>: <span class="hljs-number">75%</span>}
<span class="hljs-selector-class">.col10</span> {<span class="hljs-attribute">width</span>: <span class="hljs-number">83.33%</span>}
<span class="hljs-selector-class">.col11</span> {<span class="hljs-attribute">width</span>: <span class="hljs-number">91.66%</span>}
<span class="hljs-selector-class">.col12</span> {<span class="hljs-attribute">width</span>: <span class="hljs-number">100%</span>}
</code></pre>
<p>&#x4E0A;&#x4E00;&#x4E2A;&#x5B8C;&#x6574;&#x7684;&#x793A;&#x4F8B;&#x6765;&#x770B;&#x770B;&#x5427;&#xFF1A;</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">html</span> <span class="hljs-attr">lang</span>=<span class="hljs-string">&quot;en&quot;</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">head</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">meta</span> <span class="hljs-attr">charset</span>=<span class="hljs-string">&quot;UTF-8&quot;</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">title</span>&gt;</span>Title<span class="hljs-tag">&lt;/<span class="hljs-name">title</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">style</span>&gt;</span><span class="css">
        <span class="hljs-selector-tag">body</span> {
            <span class="hljs-attribute">margin</span>: <span class="hljs-number">0</span>;
        }
        <span class="hljs-selector-class">.app</span> {
            <span class="hljs-attribute">font-size</span>: <span class="hljs-number">0</span>;
        }
        <span class="hljs-selector-class">.app</span> <span class="hljs-selector-tag">div</span> {
            <span class="hljs-attribute">box-sizing</span>: border-box;
            <span class="hljs-attribute">border</span>: <span class="hljs-number">1px</span> solid red;
            <span class="hljs-attribute">height</span>: <span class="hljs-number">200px</span>;
            <span class="hljs-attribute">display</span>: inline-block;
            <span class="hljs-attribute">vertical-align</span>: top;
        }
        <span class="hljs-selector-class">.col1</span>  {<span class="hljs-attribute">width</span>: <span class="hljs-number">8.33%</span>}
        <span class="hljs-selector-class">.col2</span>  {<span class="hljs-attribute">width</span>: <span class="hljs-number">16.66%</span>}
        <span class="hljs-selector-class">.col3</span>  {<span class="hljs-attribute">width</span>: <span class="hljs-number">25%</span>}
        <span class="hljs-selector-class">.col4</span>  {<span class="hljs-attribute">width</span>: <span class="hljs-number">33.33%</span>}
        <span class="hljs-selector-class">.col5</span>  {<span class="hljs-attribute">width</span>: <span class="hljs-number">41.66%</span>}
        <span class="hljs-selector-class">.col6</span>  {<span class="hljs-attribute">width</span>: <span class="hljs-number">50%</span>}
        <span class="hljs-selector-class">.col7</span>  {<span class="hljs-attribute">width</span>: <span class="hljs-number">58.33%</span>}
        <span class="hljs-selector-class">.col8</span>  {<span class="hljs-attribute">width</span>: <span class="hljs-number">66.66%</span>}
        <span class="hljs-selector-class">.col9</span>  {<span class="hljs-attribute">width</span>: <span class="hljs-number">75%</span>}
        <span class="hljs-selector-class">.col10</span> {<span class="hljs-attribute">width</span>: <span class="hljs-number">83.33%</span>}
        <span class="hljs-selector-class">.col11</span> {<span class="hljs-attribute">width</span>: <span class="hljs-number">91.66%</span>}
        <span class="hljs-selector-class">.col12</span> {<span class="hljs-attribute">width</span>: <span class="hljs-number">100%</span>}
    </span><span class="hljs-tag">&lt;/<span class="hljs-name">style</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">head</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">body</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">&quot;app&quot;</span>&gt;</span>
        <span class="hljs-comment">&lt;!-- 4&#x4E2A;div &#x5360;&#x6EE1;&#x4E00;&#x884C; --&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">&quot;col1&quot;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">&quot;col2&quot;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">&quot;col3&quot;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">&quot;col6&quot;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">body</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">html</span>&gt;</span>
</code></pre>
<p>&#x6700;&#x540E;&#x5448;&#x73B0;&#x51FA;&#x6765;&#x7684;&#x6548;&#x679C;&#x662F;&#x8FD9;&#x6837;&#x7684;&#x3002;
<img src="https://github.com/woai3c/Front-end-articles/blob/master/imgs/grid4.jpg" alt="grid4"></p>
<p>&#x600E;&#x4E48;&#x6837;&#xFF1F;&#x662F;&#x4E0D;&#x662F;&#x5F88;&#x7B80;&#x5355;&#x3002;</p>
<h2 id="&#x8FDB;&#x9636;">&#x8FDB;&#x9636;</h2>
<p>&#x7ED3;&#x5408; <code>@media</code> &#x5A92;&#x4F53;&#x67E5;&#x8BE2;&#xFF0C;&#x6211;&#x4EEC;&#x53EF;&#x4EE5;&#x505A;&#x5F97;&#x66F4;&#x591A;&#x3002;<a href="https://developer.mozilla.org/zh-CN/docs/Web/CSS/@media" target="_blank">@media &#x8BE6;&#x60C5;&#x8BF7;&#x770B;MDN</a></p>
<p>&#x76F8;&#x4FE1;&#x7528;&#x8FC7; bootstrap &#x6805;&#x683C;&#x5316;&#x7CFB;&#x7EDF;&#x7684;&#x90FD;&#x77E5;&#x9053;&#xFF0C;&#x5728; bootstrap &#x6805;&#x683C;&#x5316;&#x7CFB;&#x7EDF;&#x4E2D;&#xFF0C;&#x6709;&#x4E00;&#x4E9B; <code>col-md</code> <code>col-sm</code> &#x5C5E;&#x6027;&#xFF0C;&#x5B83;&#x4EEC;&#x662F;&#x5E72;&#x4EC0;&#x4E48;&#x7528;&#x7684;&#x5462;&#xFF1F;
&#x5176;&#x5B9E;&#xFF0C;&#x5B83;&#x4EEC;&#x90FD;&#x662F;&#x6805;&#x683C;&#x5316;&#x7CFB;&#x7EDF;&#x7684; CSS &#x7C7B;&#x540D;&#xFF0C;&#x53EA;&#x662F;&#x9488;&#x5BF9;&#x4E86;&#x4E0D;&#x540C;&#x7684;&#x5C4F;&#x5E55;&#x5BBD;&#x5EA6;&#x3002;</p>
<p>&#x5047;&#x5982;&#x6211;&#x4EEC;&#x6709;&#x8FD9;&#x6837;&#x7684;&#x4E00;&#x4E2A;&#x9700;&#x6C42;&#xFF1A;
&#x5728; PC &#x4E0A;&#xFF0C;&#x56E0;&#x4E3A;&#x5C4F;&#x5E55;&#x6BD4;&#x8F83;&#x5927;&#xFF0C;&#x6211;&#x4EEC;&#x8981;&#x6C42;&#x4E00;&#x884C;&#x663E;&#x793A; 4 &#x5217;&#x7684;&#x5185;&#x5BB9;&#x3002;&#x4F46;&#x662F;&#x5728;&#x624B;&#x673A;&#x4E0A;&#xFF0C;&#x56E0;&#x4E3A;&#x5C4F;&#x5E55;&#x6BD4;&#x8F83;&#x5C0F;&#xFF0C;&#x8981;&#x6C42;&#x4E00;&#x884C;&#x663E;&#x793A; 3 &#x5217;&#x7684;&#x5185;&#x5BB9;&#x3002;
&#x5373;&#x4E00;&#x4E2A;&#x7F51;&#x7AD9;&#x540C;&#x65F6;&#x9002;&#x914D; PC &#x548C;&#x624B;&#x673A;&#x7AEF;&#xFF0C;&#x6839;&#x636E;&#x4E0D;&#x540C;&#x7684;&#x7AEF;&#x81EA;&#x52A8;&#x8C03;&#x6574;&#x9875;&#x9762;&#x3002;</p>
<p>&#x6B64;&#x65F6;&#xFF0C;&#x6211;&#x4EEC;&#x53EF;&#x4EE5;&#x8FD9;&#x6837;&#x505A;&#xFF1A;</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">html</span> <span class="hljs-attr">lang</span>=<span class="hljs-string">&quot;en&quot;</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">head</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">meta</span> <span class="hljs-attr">charset</span>=<span class="hljs-string">&quot;UTF-8&quot;</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">title</span>&gt;</span>Title<span class="hljs-tag">&lt;/<span class="hljs-name">title</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">style</span>&gt;</span><span class="css">
        <span class="hljs-selector-tag">body</span> {
            <span class="hljs-attribute">margin</span>: <span class="hljs-number">0</span>;
        }
        <span class="hljs-selector-class">.app</span> {
            <span class="hljs-attribute">font-size</span>: <span class="hljs-number">0</span>;
        }
        <span class="hljs-selector-class">.app</span> <span class="hljs-selector-tag">div</span> {
            <span class="hljs-attribute">box-sizing</span>: border-box;
            <span class="hljs-attribute">border</span>: <span class="hljs-number">1px</span> solid red;
            <span class="hljs-attribute">height</span>: <span class="hljs-number">200px</span>;
            <span class="hljs-attribute">display</span>: inline-block;
            <span class="hljs-attribute">vertical-align</span>: top;
        }
        <span class="hljs-comment">/* &#x9488;&#x5BF9;&#x5C4F;&#x5E55;&#x5206;&#x8FA8;&#x7387;&#x5927;&#x4E8E;&#x7B49;&#x4E8E;1200&#x7684; */</span>
        @<span class="hljs-keyword">media</span> (min-width: <span class="hljs-number">1200px</span>) {
            <span class="hljs-selector-class">.col-md1</span>  {<span class="hljs-attribute">width</span>: <span class="hljs-number">8.33%</span>}
            <span class="hljs-selector-class">.col-md2</span>  {<span class="hljs-attribute">width</span>: <span class="hljs-number">16.66%</span>}
            <span class="hljs-selector-class">.col-md3</span>  {<span class="hljs-attribute">width</span>: <span class="hljs-number">25%</span>}
            <span class="hljs-selector-class">.col-md4</span>  {<span class="hljs-attribute">width</span>: <span class="hljs-number">33.33%</span>}
            <span class="hljs-selector-class">.col-md5</span>  {<span class="hljs-attribute">width</span>: <span class="hljs-number">41.66%</span>}
            <span class="hljs-selector-class">.col-md6</span>  {<span class="hljs-attribute">width</span>: <span class="hljs-number">50%</span>}
            <span class="hljs-selector-class">.col-md7</span>  {<span class="hljs-attribute">width</span>: <span class="hljs-number">58.33%</span>}
            <span class="hljs-selector-class">.col-md8</span>  {<span class="hljs-attribute">width</span>: <span class="hljs-number">66.66%</span>}
            <span class="hljs-selector-class">.col-md9</span>  {<span class="hljs-attribute">width</span>: <span class="hljs-number">75%</span>}
            <span class="hljs-selector-class">.col-md10</span> {<span class="hljs-attribute">width</span>: <span class="hljs-number">83.33%</span>}
            <span class="hljs-selector-class">.col-md11</span> {<span class="hljs-attribute">width</span>: <span class="hljs-number">91.66%</span>}
            <span class="hljs-selector-class">.col-md12</span> {<span class="hljs-attribute">width</span>: <span class="hljs-number">100%</span>}
    }
        <span class="hljs-comment">/* &#x9488;&#x5BF9;&#x5C4F;&#x5E55;&#x5206;&#x8FA8;&#x7387;&#x5C0F;&#x4E8E;1200&#x7684; */</span>
    @<span class="hljs-keyword">media</span> (max-width: <span class="hljs-number">1199px</span>) {
            <span class="hljs-selector-class">.col-sm1</span>  {<span class="hljs-attribute">width</span>: <span class="hljs-number">8.33%</span>}
            <span class="hljs-selector-class">.col-sm2</span>  {<span class="hljs-attribute">width</span>: <span class="hljs-number">16.66%</span>}
            <span class="hljs-selector-class">.col-sm3</span>  {<span class="hljs-attribute">width</span>: <span class="hljs-number">25%</span>}
            <span class="hljs-selector-class">.col-sm4</span>  {<span class="hljs-attribute">width</span>: <span class="hljs-number">33.33%</span>}
            <span class="hljs-selector-class">.col-sm5</span>  {<span class="hljs-attribute">width</span>: <span class="hljs-number">41.66%</span>}
            <span class="hljs-selector-class">.col-sm6</span>  {<span class="hljs-attribute">width</span>: <span class="hljs-number">50%</span>}
            <span class="hljs-selector-class">.col-sm7</span>  {<span class="hljs-attribute">width</span>: <span class="hljs-number">58.33%</span>}
            <span class="hljs-selector-class">.col-sm8</span>  {<span class="hljs-attribute">width</span>: <span class="hljs-number">66.66%</span>}
            <span class="hljs-selector-class">.col-sm9</span>  {<span class="hljs-attribute">width</span>: <span class="hljs-number">75%</span>}
            <span class="hljs-selector-class">.col-sm10</span> {<span class="hljs-attribute">width</span>: <span class="hljs-number">83.33%</span>}
            <span class="hljs-selector-class">.col-sm11</span> {<span class="hljs-attribute">width</span>: <span class="hljs-number">91.66%</span>}
            <span class="hljs-selector-class">.col-sm12</span> {<span class="hljs-attribute">width</span>: <span class="hljs-number">100%</span>}
    }
    </span><span class="hljs-tag">&lt;/<span class="hljs-name">style</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">head</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">body</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">&quot;app&quot;</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">&quot;col-md3 col-sm4&quot;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">&quot;col-md3 col-sm4&quot;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">&quot;col-md3 col-sm4&quot;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">&quot;col-md3 col-sm4&quot;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">body</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">html</span>&gt;</span>
</code></pre>
<p>&#x4E00;&#x4E2A; DIV&#xFF0C;&#x540C;&#x65F6;&#x8BBE;&#x7F6E;&#x4E24;&#x4E2A;&#x7C7B;&#x540D;&#x3002;&#x5F53;&#x5C4F;&#x5E55; <code>&gt;=1200px</code> &#x65F6;&#xFF0C;&#x4E00;&#x884C;&#x663E;&#x793A; 4 &#x5217;&#xFF0C;&#x5F53;&#x5C4F;&#x5E55; <code>&lt;1200px</code> &#x65F6;&#xFF0C;&#x4E00;&#x884C;&#x663E;&#x793A;3&#x5217;&#xFF0C;&#x800C;&#x4E14;&#x662F;&#x6D4F;&#x89C8;&#x5668;&#x81EA;&#x52A8;&#x8C03;&#x6574;&#x3002;</p>
<p><img src="https://github.com/woai3c/Front-end-articles/blob/master/imgs/grid5.jpg" alt="grid5"></p>
<p><img src="https://github.com/woai3c/Front-end-articles/blob/master/imgs/grid6.jpg" alt="grid6"></p>
<p>&#x4E00;&#x4E2A;&#x6805;&#x683C;&#x5316;&#x7CFB;&#x7EDF;&#x5C31;&#x8FD9;&#x6837;&#x5B9E;&#x73B0;&#x4E86;&#x3002;</p>
<h2 id="&#x7EC3;&#x4E60;&#x4EFB;&#x52A1;">&#x7EC3;&#x4E60;&#x4EFB;&#x52A1;</h2>
<p>&#x5BF9;&#x4E8E;&#x6805;&#x683C;&#x5316;&#x7684;&#x4ECB;&#x7ECD;&#x5C31;&#x5230;&#x6B64;&#x7ED3;&#x675F;&#x4E86;&#xFF0C;&#x4F46;&#x5982;&#x679C;&#x4F60;&#x770B;&#x5B8C;&#x4E86;&#x6587;&#x7AE0;&#x540E;&#x4EC0;&#x4E48;&#x90FD;&#x4E0D;&#x505A;&#xFF0C;&#x4E0D;&#x5230;&#x4E00;&#x5468;&#xFF0C;&#x5C31;&#x4F1A;&#x628A;&#x5B66;&#x5230;&#x7684;&#x77E5;&#x8BC6;&#x5FD8;&#x5F97;&#x4E03;&#x4E03;&#x516B;&#x516B;&#xFF0C;&#x4E3A;&#x4E86;&#x5E2E;&#x52A9;&#x4F60;&#x5DE9;&#x56FA;&#x77E5;&#x8BC6;&#xFF0C;&#x7279;&#x5730;&#x5E03;&#x7F6E;&#x4E86;&#x4E00;&#x4E2A;&#x5C0F;&#x4EFB;&#x52A1;&#xFF0C;&#x6309;&#x8981;&#x6C42;&#x5B9E;&#x73B0;&#x5982;&#x4E0B;&#x9875;&#x9762;&#xFF1A;</p>
<h4 id="&#x56FE;&#x4E00;">&#x56FE;&#x4E00;</h4>
<p><img src="https://github.com/woai3c/Front-end-articles/blob/master/imgs/grid7.jpg" alt="grid7"></p>
<h4 id="&#x56FE;&#x4E8C;">&#x56FE;&#x4E8C;</h4>
<p><img src="https://github.com/woai3c/Front-end-articles/blob/master/imgs/grid8.jpg" alt="grid8"></p>
<p>&#x4EFB;&#x52A1;&#x8981;&#x6C42;&#xFF1A;</p>
<ol>
<li>&#x5F53;&#x9875;&#x9762;&#x5927;&#x4E8E; <code>768px</code> &#x65F6;&#xFF0C;&#x9875;&#x9762;&#x5982;&#x56FE;1&#x6240;&#x793A;&#x3002;</li>
<li>&#x5F53;&#x9875;&#x9762;&#x5C0F;&#x4E8E;&#x7B49;&#x4E8E; <code>768px</code> &#x65F6;&#xFF0C; &#x9875;&#x9762;&#x5982;&#x56FE;2&#x6240;&#x793A;&#x3002;</li>
</ol>
<p>&#x8FD9;&#x91CC;&#x662F;<a href="https://github.com/woai3c/2016ife-task/blob/master/part1/task8.html" target="_blank">&#x7B54;&#x6848;</a>&#x548C;<a href="http://htmlpreview.github.io/?https://github.com/woai3c/2016ife-task/blob/master/part1/task8.html" target="_blank">&#x5728;&#x7EBF;DEMO</a>&#xFF0C;&#x4F46;&#x662F;&#x6700;&#x597D;&#x5148;&#x8BD5;&#x8BD5;&#x80FD;&#x4E0D;&#x80FD;&#x81EA;&#x5DF1;&#x505A;&#x51FA;&#x6765;&#xFF0C;&#x5982;&#x679C;&#x5B9E;&#x5728;&#x505A;&#x4E0D;&#x51FA;&#x6765;&#xFF0C;&#x518D;&#x770B;&#x7B54;&#x6848;&#x3002;</p>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="./" class="navigation navigation-prev " aria-label="Previous page: 前端进阶">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="Handwritten signature.html" class="navigation navigation-next " aria-label="Next page: Handwritten Signature">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"Grid System","level":"1.3","depth":1,"next":{"title":"Handwritten Signature","level":"1.4","depth":1,"path":"前端进阶/Handwritten signature.md","ref":"前端进阶/Handwritten signature.md","articles":[]},"previous":{"title":"前端进阶","level":"1.2","depth":1,"path":"前端进阶/README.md","ref":"前端进阶/README.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["summary","livereload"],"pluginsConfig":{"summary":{},"livereload":{},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"前端进阶/Grid System.md","mtime":"2021-02-15T12:04:36.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2021-03-24T08:50:55.666Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

